package org.turnlink.sclm.model;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;
import com.thoughtworks.xstream.annotations.XStreamAlias;
/**
 * Account entity. @author MyEclipse Persistence Tools
 */
@XStreamAlias("account")
@Entity
@Table(name = "account", catalog = "turnlink", uniqueConstraints = @UniqueConstraint(columnNames = "username"))
public class Account implements java.io.Serializable {

	// Fields

	private Integer accountId;
	private String username;
	private String passwordsha1;
	private String passwordsalt;
	private Timestamp createDate;
	private Timestamp modifiedDate;

	// Constructors

	/** default constructor */
	public Account() {
	}

	/** minimal constructor */
	public Account(String username, String passwordsha1, String passwordsalt,
			Timestamp createDate) {
		this.username = username;
		this.passwordsha1 = passwordsha1;
		this.passwordsalt = passwordsalt;
		this.createDate = createDate;
	}

	/** full constructor */
	public Account(String username, String passwordsha1, String passwordsalt,
			Timestamp createDate, Timestamp modifiedDate) {
		this.username = username;
		this.passwordsha1 = passwordsha1;
		this.passwordsalt = passwordsalt;
		this.createDate = createDate;
		this.modifiedDate = modifiedDate;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "account_id", unique = true, nullable = false)
	public Integer getAccountId() {
		return this.accountId;
	}

	public void setAccountId(Integer accountId) {
		this.accountId = accountId;
	}

	@Column(name = "username", unique = true, nullable = false, length = 254)
	public String getUsername() {
		return this.username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	@Column(name = "passwordsha1", nullable = false, length = 40)
	public String getPasswordsha1() {
		return this.passwordsha1;
	}

	public void setPasswordsha1(String passwordsha1) {
		this.passwordsha1 = passwordsha1;
	}

	@Column(name = "passwordsalt", nullable = false, length = 4)
	public String getPasswordsalt() {
		return this.passwordsalt;
	}

	public void setPasswordsalt(String passwordsalt) {
		this.passwordsalt = passwordsalt;
	}

	@Column(name = "create_date", nullable = false, length = 19)
	public Timestamp getCreateDate() {
		return this.createDate;
	}

	public void setCreateDate(Timestamp createDate) {
		this.createDate = createDate;
	}

	@Column(name = "modified_date", length = 19)
	public Timestamp getModifiedDate() {
		return this.modifiedDate;
	}

	public void setModifiedDate(Timestamp modifiedDate) {
		this.modifiedDate = modifiedDate;
	}

}